package cn.ruleengine.core.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author xianrensawang
 * @date 2021/7/16
 */
@Getter
@AllArgsConstructor
public enum WrapperEnum {

    RULE_PRE("HSP-RULE-ENGINE-PRE", "规则缓存前缀"),

    COLON(":","冒号"),
    ;

    private final String code;

    private final String name;


    public static String assembleKey(String workspaceCode, String code){
        return WrapperEnum.RULE_PRE.getCode() + WrapperEnum.COLON.getCode() +
                workspaceCode + WrapperEnum.COLON.getCode() + code;
    }

}
